// @ts-nocheck
/*
 * @Descripttion: 胡腾辉 | feico
 * @version: V1.0
 * @Author: feico
 * @Date: 2022-02-23 10:20:08
 * @LastEditors: feico
 * @LastEditTime: 2022-02-23 10:22:13
 */
import { getChannel } from '../store/action/article'
import { useEffect } from 'react'
import { useDispatch,useSelector } from 'react-redux'

export  function useChannels() {
    const dispatch = useDispatch()
    const channels = useSelector((state) => state.article.channels)
    useEffect(() => {
        dispatch(getChannel())
    }, [dispatch])
    return channels
    }